package com.lenovo.lcdm.type.vo;
import java.io.Serializable;
import java.util.Objects;

public class ObjectIdentifier implements Serializable {

    public ObjectIdentifier(Long id, String objectClass){
        this.id = id;
        this.objectClass = objectClass;
    }

    Long id;

    String objectClass;

    /**
     *
     * @description 确保程序正常运行
     * @see  ObjectIdentifier#ObjectIdentifier(Long, String)
     * @return
     * @author
     * @date
     */
    @Deprecated
    public ObjectIdentifier() {
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getObjectClass() {
        return objectClass;
    }

    public void setObjectClass(String objectClass) {
        this.objectClass = objectClass;
    }

    @Override
    public String toString() {
        return this.id +"-"+ this.objectClass;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ObjectIdentifier that = (ObjectIdentifier) o;
        return Objects.equals(id, that.id) &&
                Objects.equals(objectClass, that.objectClass);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, objectClass);
    }
}
